#!/bin/sh
# check-sets - show missing and superfluous files

. config

rm -f sets/*~
cat sets/* sets/$A/* |sort |uniq >/tmp/cs-sets
cd $R
find . | sed 's/^\.//' | egrep -v '^($|/dev/|/proc/|/tmp/|/root/|/src/linux-2.6|/sys/)' | sort >/tmp/cs-all

comm -13 /tmp/cs-all /tmp/cs-sets >/tmp/cs-missing
comm -23 /tmp/cs-all /tmp/cs-sets >/tmp/cs-superfluous

echo $(wc -l /tmp/cs-missing |cut -d" " -f 1) files missing:
cat /tmp/cs-missing
echo

echo $(wc -l /tmp/cs-superfluous |cut -d" " -f 1) files superfluous:
cat /tmp/cs-superfluous
